# Contributor: Steve McMaster <code@mcmaster.io>
# Maintainer: Steve McMaster <code@mcmaster.io>
pkgname=libhtp
pkgver=0.5.49
pkgrel=0
pkgdesc="HTTP normalizer and parser library"
url="https://github.com/OISF/libhtp"
arch="all"
license="BSD-3-Clause"
depends_dev="zlib-dev"
makedepends="$depends_dev automake autoconf libtool"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/OISF/libhtp/archive/$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-static
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

check() {
	make check
}

sha512sums="
4418a516527e4318e63430d923983157bb58669994f3d173bda2bbdff87b3833c858625019c1819f7db955a148f7b0af1c12da87ce7cff81d22772a300d5827f  libhtp-0.5.49.tar.gz
"
